home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7427 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: cs.utk.edu!not-for-mail
  2. From: charlton@cs.utk.edu (Ron Charlton)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Leap Years
  5. Date: 26 Feb 1996 10:48:06 -0500
  6. Organization: CS Department, University of Tennessee, Knoxville
  7. Message-ID: <4gsknmINN7ff@duncan.cs.utk.edu>
  8. References: <824158191snz@genesis.demon.co.uk> <fcusack-1302960025280001@mudskipper.cac.psu.edu> <4go5h2$sql@s02.pavilion.co.uk>
  9. NNTP-Posting-Host: duncan.cs.utk.edu
  10.  
  11. In article <4go5h2$sql@s02.pavilion.co.uk> AJRobb@pavilion.co.uk (Andy J Robb) writes:
  12.  
  13. |It is largely achademic, in the period 1901-2099 all years divisible
  14. |by 4 are leap years.  Before that the Julian calender was still in
  15. |widespread use (e.g. Russia until 1917).  In some parts of Britain
  16. |(and elsewhere) before 1752(?) the year ended on March 22(?).
  17. |
  18. |My point is that before radio-astronomy (mainly), global time-keeping
  19. |was a mess.  Who can guarantee that the Gregorian calender will be in
  20. |use in 2100?  Many operating systems (Unix) will have run out of
  21. |precision by then.
  22.  
  23. This sort of thinking in the years 1960-1996 has put us in the position
  24. of spending *many* millions of dollars to recover from the two-digit year
  25. syndrome.  A.D. 2000 is likely to be an exciting time for programmers
  26. as we try to discover all of the places "68" really represents "1968".
  27. All to save two bytes when storing the year.  Many of the programmers who
  28. used two-year dates may be retired or dead now.  *You* get to fix their
  29. "streamlined" code.  (Yes, I know memory was once much more expensive,
  30. and saving two bytes might have been important, but I'd argue it has
  31. not been a valid justification since about 1980.)
  32.  
  33. We are now making the same mistake when we "simplify" the leap year
  34. calculation.  Why not just do it correctly now?  If the rules change
  35. then at least future programmers won't be damning us for our laziness.
  36.  
  37. A.D. 2100 is a long time away.  A.D. 2000 was also a long time away in 1960.
  38.  
  39. Ron
  40. -- 
  41. A just machine to make big decisions              |    Ron Charlton
  42. Programmed by fellows with compassion and vision      |    charlton@cs.utk.edu
  43. We'll be clean when their work is done               ----------------------
  44. We'll be eternally free yes and eternally young -- Donald Fagen, I.G.Y.
  45.